@import './_variables';
body {
    margin: 0;
    height: 100vh;
    background: #F4F5F6;
}
*{
    box-sizing: border-box;
    outline: none;
}

@each $colorKey, $color in $colors {
    .text-#{$colorKey} {
        color: $color;
    }
    .bg-#{$colorKey} {
        background-color: $color !important;
    }
}

@each $var in (left, center, right) {
    .text-#{$var} {
        text-align: $var !important;
    }
}

@each $sizeKey, $size in $font-sizes {
    .fs-#{$sizeKey} {
      font-size: $size * $base-font-size;
    }
}

.text-ellipsis {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.d-flex {
    display: flex;
}
.flex-column {
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}

@each $key, $value in $flex-jc {
    .jc-#{$key} {
        justify-content: $value;
    }
}

@each $key, $value in $flex-ai {
    .ai-#{$key} {
        align-items: $value;
    }
}

.flex-1 {
    flex: 1;
}

.flex-grow-1 {
    flex-grow: 1;
}

// m -> 外边距, p -> 内边距
@each $typeKey, $type in $spacing-types {
	
    // .m-1  .p-1  代表 上下左右  具体距离是多少参照 $spacing-sizes
    @each $sizeKey, $size in $spacing-sizes {
        .#{$typeKey}-#{$sizeKey} {
        #{$type}: $size * $spacing-base-size;
        }
    }
    
    // .mx-1 .my-1 .px-1 .py-1  ||  x代表左右间距   y代表上下间距   ||  具体距离是多少参照 $spacing-sizes
    @each $sizeKey, $size in $spacing-sizes {
        .#{$typeKey}x-#{$sizeKey} {
            #{$type}-left: $size * $spacing-base-size;
            #{$type}-right: $size * $spacing-base-size;
        }
        .#{$typeKey}y-#{$sizeKey} {
            #{$type}-top: $size * $spacing-base-size;
            #{$type}-bottom: $size * $spacing-base-size;
        }
    }
    
    // .mt-1 .pt-1   ||  t代表上  r代表右  b代表下  l代表左  ||   具体距离是多少参照 $spacing-directions
    @each $directionKey, $direction in $spacing-directions {
        @each $sizeKey, $size in $spacing-sizes {
            .#{$typeKey}#{$directionKey}-#{$sizeKey} {
                #{$type}-#{$direction}: $size * $spacing-base-size;
            }
        }
    }
    
}